#ifndef TASKMANAGER_H
#define TASKMANAGER_H

#include <QObject>
#include <QList>
#include <QMap>
#include <QByteArray>
#include <QtScript/QScriptEngine>
#include <QtScript/QScriptValue>
#include <QtScript/QScriptValueIterator>

#include "cvsession.h"
#include "util/cvutil.h"
#include "http/cvhttp.h"
#include "model/task.h"
class TaskManager : public QObject
{
    Q_OBJECT
public:
    explicit TaskManager();
    
    void getTasks(int limit = 10, int offset = 0,
                  QString filterSpaceTag = "profile", QString filterId = "all",
                  QString searchKey = "");
signals:
    void handleTasks(QList<Task *> list);
public slots:
private slots:
    void parseData(QScriptValue json, const QString &msg);
    
};

#endif // TASKMANAGER_H
